package cn.wolfcode.springcloud.domain;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;


//Serializable序列号，对象转化位二进制
public class Product implements Serializable{
    private Long id;//商品id
    private String name;//商品名称
    private BigDecimal price;//商品价格
    private int stock;//商品库存

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id=id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name=name;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price=price;
    }

    public int getStock() {
        return stock;
    }

    public void setStock(int stock) {
        this.stock=stock;
    }

    public Product() {
    }

    public Product(Long id, String name, BigDecimal price, int stock) {
        this.id=id;
        this.name=name;
        this.price=price;
        this.stock=stock;
    }
}